import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
// import quagga from '@/uni_modules/mumu-oneCode/components/mumu-oneCode'
// import quagga from '@/uni_modules/mumu-oneCode/components/mumu-oneCode/quagga.min.js';
// https://vitejs.dev/config/
export default defineConfig({

	plugins: [uni()],
	server: {
		open: true,
		host: "192.168.31.18", // 指定服务器应该监听哪个IP地址,默认：localhost
		port: 7788,

		proxy: {           // 为开发服务器配置自定义代理规则
			// 这个代理路径名称/wxapi自行修改，如/proapi
			"/amap": {
				target: "https://apis.map.qq.com", // 目标接口，请求的根地址拿过来
				changeOrigin: true,            // 是否换源
				rewrite: (path) => path.replace(/^\/amap/, ""),
			}
		}
	},
	

});